package com.hl.shifangzhiyu.web;


import com.hl.shifangzhiyu.pojo.Zixunshi;
import com.hl.shifangzhiyu.service.ZixunshiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/zixunshi")
public class ZixunshiController {

    @Autowired
    private ZixunshiService zixunshiService;
    @RequestMapping("/list1")
    public List<Zixunshi> list(@RequestBody Zixunshi zixunshi) {
        System.out.println(zixunshi.getGrade());
        System.out.println(zixunshi.getKind());
        System.out.println(zixunshi);
        return zixunshiService.list(zixunshi);
    }
    @RequestMapping("/list")
    public List<Zixunshi> listAll() {
        return zixunshiService.listAll();
    }
}
